Skip to content

fix(nuget): use unique suffix for global.json backup#823

Merged
BYK merged 1 commit into
getsentry:masterfrom
jamescrosswell:fix/setversion-global-json-unique
Jun 4, 2026
Merged

fix(nuget): use unique suffix for global.json backup#823
BYK merged 1 commit into
getsentry:masterfrom
jamescrosswell:fix/setversion-global-json-unique

Conversation

@jamescrosswell
Copy link
Copy Markdown
Contributor

@jamescrosswell jamescrosswell commented May 24, 2026

Summary

Follow-up to #820, addressing BYK's review note.

The backup path was hardcoded to global.json.craft-bak. If two craft invocations ever ran against the same working directory, the second would clobber the first's backup. Probability is very low in normal use (craft typically runs in a release-specific checkout), but a unique suffix costs nothing.

Uses crypto.randomUUID() to make the backup name unique per invocation.

Follow-up to getsentry#820. The backup path was a fixed `global.json.craft-bak`,
which could theoretically clash if two craft invocations ran against the
same working directory. Use `crypto.randomUUID()` to make the suffix
unique per invocation.

Refs: getsentry#820 (comment)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it took me so long and thanks a lot for the follow up!!!

@BYK BYK merged commit ded2112 into getsentry:master Jun 4, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants